<?php echo $header; ?><?php echo $column_left; ?>
<div id="content">
  <div class="page-header">
    <div class="container-fluid">
      <div class="pull-right">
        <button type="submit" form="form-category" data-toggle="tooltip" title="<?php echo $button_save; ?>" class="btn btn-primary"><i class="fa fa-save"></i></button>
        <a href="<?php echo $cancel; ?>" data-toggle="tooltip" title="<?php echo $button_cancel; ?>" class="btn btn-default"><i class="fa fa-reply"></i></a></div>
      <h1><?php echo $heading_title; ?></h1>
      <ul class="breadcrumb">
        <?php foreach ($breadcrumbs as $breadcrumb) { ?>
        <li><a href="<?php echo $breadcrumb['href']; ?>"><?php echo $breadcrumb['text']; ?></a></li>
        <?php } ?>
      </ul>
    </div>
  </div>
  <div class="container-fluid">
    <?php if ($error_warning) { ?>
    <div class="alert alert-danger"><i class="fa fa-exclamation-circle"></i> <?php echo $error_warning; ?>
      <button type="button" class="close" data-dismiss="alert">&times;</button>
    </div>
    <?php } ?>
    <div class="panel panel-default">
      <div class="panel-heading">
        <h3 class="panel-title"><i class="fa fa-pencil"></i> <?php echo $text_form; ?></h3>
      </div>
      <div class="panel-body">
        <form action="<?php echo $action; ?>" method="post" enctype="multipart/form-data" id="form-category" class="form-horizontal">
          <input type="hidden" name="project_customer_id" value="<?php echo $project_customer_id; ?>" > 
          <ul class="nav nav-tabs">
            <li class="active"><a href="#tab-general" data-toggle="tab"><?php echo $tab_general; ?></a></li>
          </ul>
          <div class="tab-content">
            <div class="tab-pane active" id="tab-general">
              <ul class="nav nav-tabs" id="language">
                <?php foreach ($languages as $language) { ?>
                <li><a href="#language<?php echo $language['language_id']; ?>" data-toggle="tab"><img src="view/image/flags/<?php echo $language['image']; ?>" title="<?php echo $language['name']; ?>" /> <?php echo $language['name']; ?></a></li>
                <?php } ?>
              </ul>
              <div class="tab-content">
                <?php foreach ($languages as $language) { ?>
                <div class="tab-pane" id="language<?php echo $language['language_id']; ?>">

                  <div class="form-group">
                    <label class="col-sm-3 control-label"><?php echo $entry_status; ?></label>
                    <div class="col-sm-9">
                        <select name="customer_status" id="input-customer_status" class="form-control">
                            <?php if ($customer_status) { ?>
                            <option value="1" selected="selected"><?php echo $text_enabled; ?></option>
                            <option value="0"><?php echo $text_disabled; ?></option>
                            <?php } else { ?>
                            <option value="1"><?php echo $text_enabled; ?></option>
                            <option value="0" selected="selected"><?php echo $text_disabled; ?></option>
                            <?php } ?>
                          </select>
                    </div>
                  </div>
                  <div class="form-group required">
                    <label class="col-sm-3 control-label" for="input-company_eng_name"><?php echo $entry_company_eng_name; ?></label>
                    <div class="col-sm-9">
                      <input type="text" name="company_eng_name" value="<?php echo $company_eng_name; ?>" placeholder="<?php echo $entry_company_eng_name; ?>" id="input-company_eng_name" class="form-control" />
                      <?php  if (isset($error_company_eng_name)) { ?>
                      <div class="text-danger"><?php echo $error_company_eng_name; ?></div>
                      <?php } ?>
                    </div>
                  </div>
                  <div class="form-group required">
                    <label class="col-sm-3 control-label" for="input-company_chn_name"><?php echo $entry_company_chn_name; ?></label>
                    <div class="col-sm-9">
                      <input type="text" name="company_chn_name" value="<?php echo $company_chn_name; ?>" placeholder="<?php echo $entry_company_chn_name; ?>" id="input-company_chn_name" class="form-control" />
                      <?php if (isset($error_company_chn_name)) { ?>
                      <div class="text-danger"><?php echo $error_company_chn_name; ?></div>
                      <?php } ?>
                    </div>
                  </div>

                  <div class="form-group">
                    <label class="col-sm-3 control-label" for="input-contact_person_eng_name"><?php echo $entry_contact_person_eng_name; ?></label>
                    <div class="col-sm-9">
                      <input type="text" name="contact_person_eng_name" value="<?php echo $contact_person_eng_name; ?>" placeholder="<?php echo $entry_contact_person_eng_name; ?>" id="input-contact_person_eng_name" class="form-control" />
                    </div>
                  </div>
                  <div class="form-group">
                    <label class="col-sm-3 control-label" for="input-contact_person_chn_name"><?php echo $entry_contact_person_chn_name; ?></label>
                    <div class="col-sm-9">
                      <input type="text" name="contact_person_chn_name" value="<?php echo $contact_person_chn_name; ?>" placeholder="<?php echo $entry_contact_person_chn_name; ?>" id="input-contact_person_chn_name" class="form-control" />
                    </div>
                  </div>
                  <div class="form-group">
                    <label class="col-sm-3 control-label" for="input-contact_person_tel"><?php echo $entry_contact_person_tel; ?></label>
                    <div class="col-sm-9">
                      <input type="text" name="contact_person_tel" value="<?php echo $contact_person_tel; ?>" placeholder="<?php echo $entry_contact_person_tel; ?>" id="input-contact_person_tel" class="form-control" />
                    </div>
                  </div>
                  <div class="form-group">
                    <label class="col-sm-3 control-label" for="input-contact_person_email"><?php echo $entry_contact_person_email; ?></label>
                    <div class="col-sm-9">
                      <input type="text" name="contact_person_email" value="<?php echo $contact_person_email; ?>" placeholder="<?php echo $entry_contact_person_email; ?>" id="input-contact_person_email" class="form-control" />
                    </div>
                  </div>
<<<<<<< HEAD
<<<<<<< HEAD
                  <div class="form-group">
                    <label class="col-sm-3 control-label" for="input-company_address"><?php echo $entry_company_address; ?></label>
                    <div class="col-sm-9">
                      <input type="text" name="company_address" value="<?php echo $company_address; ?>" placeholder="<?php echo $entry_company_address; ?>" id="input-company_address" class="form-control" />
                      <?php if (isset($error_company_address)) { ?>
                      <div class="text-danger"><?php echo $error_company_address; ?></div>
                      <?php } ?>                      
                    </div>
                  </div>
=======

>>>>>>> d186f0ac043b98de93b00ad49075690d01e0cbaa
=======

>>>>>>> d186f0ac043b98de93b00ad49075690d01e0cbaa

                  <div class="form-group">
                    <label class="col-sm-3 control-label" for="input-contact_person_name" ><?php echo $entry_contact_person_id; ?></label>
                    <div class="col-sm-9">
                      <div class="layui-upload" style="margin-bottom: 10px;">
                        <button type="button" class="layui-btn layui-btn-normal testList" data-name="contact_person"><?php echo $button_upload; ?></button>
                      </div> 
                    </div>
                    <label class="col-sm-3 control-label"></label>
                    <div class="col-sm-9 contact_person">
                      <?php if(isset($contact_person_childs)){ ?>
                        <?php foreach($contact_person_childs as $key => $value){ ?>
                            <div class="<?php echo 'contact_person_child_'.$value['project_file_id']; ?>">
                              <div class="input-group">
                                <input type="text" name="<?php echo 'contact_person_name['.$value['project_file_id'].']'; ?>" value="<?php echo $value['file_name'] ?>" id="input-contact_person_name" class="form-control" />
                                <input type="hidden" name="<?php echo 'contact_person_child['.$value['project_file_id'].']'; ?>" value="<?php echo $value['project_file_id'] ?>" class="form-control" />
                                <span class="input-group-btn">
                                  <a target="_blank" href="<?php echo HTTP_CATALOG.substr($value['file_url'],54);?>" class="btn btn-primary"><i class="fa fa-eye"></i>查看</a>
                                  <button type="button" data-type="contact_person_child_<?php echo $value['project_file_id'] ?>" data-name="<?php echo $value['project_file_id'] ?>"  data-id="contact_person" data-loading-text="<?php echo $text_loading; ?>" class="button-clear btn btn-danger"><i class="fa fa-eraser"></i> <?php echo $button_clear; ?>
                                  </button>
                                </span>
                              </div>
                            </div>
                        <?php } ?>
                      <?php } ?>
                    </div>
                  </div>


                  <div class="form-group" >
                    <label class="col-sm-3 control-label" for="input-company_website"><?php echo $entry_company_website; ?></label>
                    <div class="col-sm-9">
                      <input type="text" name="company_website" value="<?php echo $company_website; ?>" placeholder="<?php echo $entry_company_website; ?>" id="input-company_website" class="form-control" />
                      
                    </div>
                  </div>
                  <div class="form-group shareholder" >
                    <label class="col-sm-3 control-label" for="input-shareholder1_eng_name"><?php echo $entry_shareholder1_eng_name; ?></label>
                    <div class="col-sm-9">
                      <input type="text" name="shareholder1_eng_name" value="<?php echo $shareholder1_eng_name; ?>" placeholder="<?php echo $entry_shareholder1_eng_name; ?>" id="input-shareholder1_eng_name" class="form-control" />
                      
                    </div>
                  </div>
                  <div class="form-group shareholder" >
                    <label class="col-sm-3 control-label" for="input-shareholder1_chn_name"><?php echo $entry_shareholder1_chn_name; ?></label>
                    <div class="col-sm-9">
                      <input type="text" name="shareholder1_chn_name" value="<?php echo $shareholder1_chn_name; ?>" placeholder="<?php echo $entry_shareholder1_chn_name; ?>" id="input-shareholder1_chn_name" class="form-control" />
                      
                    </div>
                  </div>
                  <div class="form-group shareholder" >
                    <label class="col-sm-3 control-label" for="input-shareholder_share_1"><?php echo $entry_shareholder_share_1; ?></label>
                    <div class="col-sm-9">
                      <input type="text" name="shareholder_share_1" value="<?php echo $shareholder_share_1; ?>" placeholder="<?php echo $entry_shareholder_share_1; ?>" id="input-shareholder_share_1" class="form-control" />
                      <?php if (isset($error_shareholder_share_1)) { ?>
                      <div class="text-danger"><?php echo $error_shareholder_share_1; ?></div>
                      <?php } ?>
                    </div>
                  </div> 
                  <div class="form-group">
                    <label class="col-sm-3 control-label" for="input-shareholder1_name" ><?php echo $entry_shareholder1_id; ?></label>
                    <div class="col-sm-9">
                      <div class="layui-upload" style="margin-bottom: 10px;">
                        <button type="button" class="layui-btn layui-btn-normal testList" data-name="shareholder1"><?php echo $button_upload; ?></button>
                      </div> 
                    </div>
                    <label class="col-sm-3 control-label"></label>
                    <div class="col-sm-9 shareholder1">
                      <?php if(isset($shareholder1_childs)){ ?>
                        <?php foreach($shareholder1_childs as $key => $value){ ?>
                            <div class="<?php echo 'shareholder1_child_'.$value['project_file_id']; ?>">
                              <div class="input-group">
                                <input type="text" name="<?php echo 'shareholder1_name['.$value['project_file_id'].']'; ?>" value="<?php echo $value['file_name'] ?>" id="input-shareholder1_name" class="form-control" />
                                <input type="hidden" name="<?php echo 'shareholder1_child['.$value['project_file_id'].']'; ?>" value="<?php echo $value['project_file_id'] ?>" class="form-control" />
                                <span class="input-group-btn">
                                  <a target="_blank" href="<?php echo HTTP_CATALOG.substr($value['file_url'],54);?>" class="btn btn-primary"><i class="fa fa-eye"></i>查看</a>
                                  <button type="button" data-type="shareholder1_child_<?php echo $value['project_file_id'] ?>" data-name="<?php echo $value['project_file_id'] ?>"  data-id="shareholder1" data-loading-text="<?php echo $text_loading; ?>" class="button-clear btn btn-danger"><i class="fa fa-eraser"></i> <?php echo $button_clear; ?>
                                  </button>
                                </span>
                              </div>
                            </div>
                        <?php } ?>
                      <?php } ?>
                    </div>
                  </div>
                 
                 
                 <div class="form-group shareholder" >
                    <label class="col-sm-3 control-label" for="input-shareholder2_eng_name"><?php echo $entry_shareholder2_eng_name; ?></label>
                    <div class="col-sm-9">
                      <input type="text" name="shareholder2_eng_name" value="<?php echo $shareholder2_eng_name; ?>" placeholder="<?php echo $entry_shareholder2_eng_name; ?>" id="input-shareholder2_eng_name" class="form-control" />
                      
                    </div>
                  </div>
                  <div class="form-group shareholder" >
                    <label class="col-sm-3 control-label" for="input-shareholder2_chn_name"><?php echo $entry_shareholder2_chn_name; ?></label>
                    <div class="col-sm-9">
                      <input type="text" name="shareholder2_chn_name" value="<?php echo $shareholder2_chn_name; ?>" placeholder="<?php echo $entry_shareholder2_chn_name; ?>" id="input-shareholder2_chn_name" class="form-control" />
                      
                    </div>
                  </div>
                  <div class="form-group shareholder" >
                    <label class="col-sm-3 control-label" for="input-shareholder_share_2"><?php echo $entry_shareholder_share_2; ?></label>
                    <div class="col-sm-9">
                      <input type="text" name="shareholder_share_2" value="<?php echo $shareholder_share_2; ?>" placeholder="<?php echo $entry_shareholder_share_2; ?>" id="input-shareholder_share_2" class="form-control" />
                      <?php if (isset($error_shareholder_share_2)) { ?>
                      <div class="text-danger"><?php echo $error_shareholder_share_2; ?></div>
                      <?php } ?>                      
                    </div>
                  </div>
                  <div class="form-group">
                    <label class="col-sm-3 control-label" for="input-shareholder2_name" ><?php echo $entry_shareholder2_id; ?></label>
                    <div class="col-sm-9">
                      <div class="layui-upload" style="margin-bottom: 10px;">
                        <button type="button" class="layui-btn layui-btn-normal testList" data-name="shareholder2"><?php echo $button_upload; ?></button>
                      </div> 
                    </div>
                    <label class="col-sm-3 control-label"></label>
                    <div class="col-sm-9 shareholder2">
                      <?php if(isset($shareholder2_childs)){ ?>
                        <?php foreach($shareholder2_childs as $key => $value){ ?>
                            <div class="<?php echo 'shareholder2_child_'.$value['project_file_id']; ?>">
                              <div class="input-group">
                                <input type="text" name="<?php echo 'shareholder2_name['.$value['project_file_id'].']'; ?>" value="<?php echo $value['file_name'] ?>" id="input-shareholder2_name" class="form-control" />
                                <input type="hidden" name="<?php echo 'shareholder2_child['.$value['project_file_id'].']'; ?>" value="<?php echo $value['project_file_id'] ?>" class="form-control" />
                                <span class="input-group-btn">
                                  <a target="_blank" href="<?php echo HTTP_CATALOG.substr($value['file_url'],54);?>" class="btn btn-primary"><i class="fa fa-eye"></i>查看</a>
                                  <button type="button" data-type="shareholder2_child_<?php echo $value['project_file_id'] ?>" data-name="<?php echo $value['project_file_id'] ?>"  data-id="shareholder2" data-loading-text="<?php echo $text_loading; ?>" class="button-clear btn btn-danger"><i class="fa fa-eraser"></i> <?php echo $button_clear; ?>
                                  </button>
                                </span>
                              </div>
                            </div>
                        <?php } ?>
                      <?php } ?>
                    </div>
                  </div>
 

                  <div class="form-group shareholder" >
                    <label class="col-sm-3 control-label" for="input-shareholder3_eng_name"><?php echo $entry_shareholder3_eng_name; ?></label>
                    <div class="col-sm-9">
                      <input type="text" name="shareholder3_eng_name" value="<?php echo $shareholder3_eng_name; ?>" placeholder="<?php echo $entry_shareholder3_eng_name; ?>" id="input-shareholder3_eng_name" class="form-control" />
                      
                    </div>
                  </div>
                  <div class="form-group shareholder" >
                    <label class="col-sm-3 control-label" for="input-shareholder3_chn_name"><?php echo $entry_shareholder3_chn_name; ?></label>
                    <div class="col-sm-9">
                      <input type="text" name="shareholder3_chn_name" value="<?php echo $shareholder3_chn_name; ?>" placeholder="<?php echo $entry_shareholder3_chn_name; ?>" id="input-shareholder3_chn_name" class="form-control" />
                      
                    </div>
                  </div>
                  <div class="form-group shareholder" >
                    <label class="col-sm-3 control-label" for="input-shareholder_share_3"><?php echo $entry_shareholder_share_3; ?></label>
                    <div class="col-sm-9">
                      <input type="text" name="shareholder_share_3" value="<?php echo $shareholder_share_3; ?>" placeholder="<?php echo $entry_shareholder_share_3; ?>" id="input-shareholder_share_3" class="form-control" />
                      <?php if (isset($error_shareholder_share_3)) { ?>
                      <div class="text-danger"><?php echo $error_shareholder_share_3; ?></div>
                      <?php } ?>                      
                    </div>
                  </div>
                  <div class="form-group">
                    <label class="col-sm-3 control-label" for="input-shareholder3_name" ><?php echo $entry_shareholder3_id; ?></label>
                    <div class="col-sm-9">
                      <div class="layui-upload" style="margin-bottom: 10px;">
                        <button type="button" class="layui-btn layui-btn-normal testList" data-name="shareholder3"><?php echo $button_upload; ?></button>
                      </div> 
                    </div>
                    <label class="col-sm-3 control-label"></label>
                    <div class="col-sm-9 shareholder3">
                      <?php if(isset($shareholder3_childs)){ ?>
                        <?php foreach($shareholder3_childs as $key => $value){ ?>
                            <div class="<?php echo 'shareholder3_child_'.$value['project_file_id']; ?>">
                              <div class="input-group">
                                <input type="text" name="<?php echo 'shareholder3_name['.$value['project_file_id'].']'; ?>" value="<?php echo $value['file_name'] ?>" id="input-shareholder3_name" class="form-control" />
                                <input type="hidden" name="<?php echo 'shareholder3_child['.$value['project_file_id'].']'; ?>" value="<?php echo $value['project_file_id'] ?>" class="form-control" />
                                <span class="input-group-btn">
                                  <a target="_blank" href="<?php echo HTTP_CATALOG.substr($value['file_url'],54);?>" class="btn btn-primary"><i class="fa fa-eye"></i>查看</a>
                                  <button type="button" data-type="shareholder3_child_<?php echo $value['project_file_id'] ?>" data-name="<?php echo $value['project_file_id'] ?>"  data-id="shareholder3" data-loading-text="<?php echo $text_loading; ?>" class="button-clear btn btn-danger"><i class="fa fa-eraser"></i> <?php echo $button_clear; ?>
                                  </button>
                                </span>
                              </div>
                            </div>
                        <?php } ?>
                      <?php } ?>
                    </div>
                  </div>
 

                  <div class="form-group shareholder" >
                    <label class="col-sm-3 control-label" for="input-shareholder4_eng_name"><?php echo $entry_shareholder4_eng_name; ?></label>
                    <div class="col-sm-9">
                      <input type="text" name="shareholder4_eng_name" value="<?php echo $shareholder4_eng_name; ?>" placeholder="<?php echo $entry_shareholder4_eng_name; ?>" id="input-shareholder4_eng_name" class="form-control" />
                      
                    </div>
                  </div>
                  <div class="form-group shareholder" >
                    <label class="col-sm-3 control-label" for="input-shareholder4_chn_name"><?php echo $entry_shareholder4_chn_name; ?></label>
                    <div class="col-sm-9">
                      <input type="text" name="shareholder4_chn_name" value="<?php echo $shareholder4_chn_name; ?>" placeholder="<?php echo $entry_shareholder4_chn_name; ?>" id="input-shareholder4_chn_name" class="form-control" />
                      
                    </div>
                  </div>
                  <div class="form-group shareholder" >
                    <label class="col-sm-3 control-label" for="input-shareholder_share_4"><?php echo $entry_shareholder_share_4; ?></label>
                    <div class="col-sm-9">
                      <input type="text" name="shareholder_share_4" value="<?php echo $shareholder_share_4; ?>" placeholder="<?php echo $entry_shareholder_share_4; ?>" id="input-shareholder_share_4" class="form-control" />
                      <?php if (isset($error_shareholder_share_4)) { ?>
                      <div class="text-danger"><?php echo $error_shareholder_share_4; ?></div>
                      <?php } ?> 
                    </div>
                  </div> 
                  <div class="form-group">
                    <label class="col-sm-3 control-label" for="input-shareholder4_name" ><?php echo $entry_shareholder4_id; ?></label>
                    <div class="col-sm-9">
                      <div class="layui-upload" style="margin-bottom: 10px;">
                        <button type="button" class="layui-btn layui-btn-normal testList" data-name="shareholder4"><?php echo $button_upload; ?></button>
                      </div> 
                    </div>
                    <label class="col-sm-3 control-label"></label>
                    <div class="col-sm-9 shareholder4">
                      <?php if(isset($shareholder4_childs)){ ?>
                        <?php foreach($shareholder4_childs as $key => $value){ ?>
                            <div class="<?php echo 'shareholder4_child_'.$value['project_file_id']; ?>">
                              <div class="input-group">
                                <input type="text" name="<?php echo 'shareholder4_name['.$value['project_file_id'].']'; ?>" value="<?php echo $value['file_name'] ?>" id="input-shareholder4_name" class="form-control" />
                                <input type="hidden" name="<?php echo 'shareholder4_child['.$value['project_file_id'].']'; ?>" value="<?php echo $value['project_file_id'] ?>" class="form-control" />
                                <span class="input-group-btn">
                                  <a target="_blank" href="<?php echo HTTP_CATALOG.substr($value['file_url'],54);?>" class="btn btn-primary"><i class="fa fa-eye"></i>查看</a>
                                  <button type="button" data-type="shareholder4_child_<?php echo $value['project_file_id'] ?>" data-name="<?php echo $value['project_file_id'] ?>"  data-id="shareholder4" data-loading-text="<?php echo $text_loading; ?>" class="button-clear btn btn-danger"><i class="fa fa-eraser"></i> <?php echo $button_clear; ?>
                                  </button>
                                </span>
                              </div>
                            </div>
                        <?php } ?>
                      <?php } ?>
                    </div>
                  </div>


                  <div class="form-group shareholder" >
                    <label class="col-sm-3 control-label" for="input-shareholder5_eng_name"><?php echo $entry_shareholder5_eng_name; ?></label>
                    <div class="col-sm-9">
                      <input type="text" name="shareholder5_eng_name" value="<?php echo $shareholder5_eng_name; ?>" placeholder="<?php echo $entry_shareholder5_eng_name; ?>" id="input-shareholder5_eng_name" class="form-control" />
                      
                    </div>
                  </div>
                  <div class="form-group shareholder" >
                    <label class="col-sm-3 control-label" for="input-shareholder5_chn_name"><?php echo $entry_shareholder5_chn_name; ?></label>
                    <div class="col-sm-9">
                      <input type="text" name="shareholder5_chn_name" value="<?php echo $shareholder5_chn_name; ?>" placeholder="<?php echo $entry_shareholder5_chn_name; ?>" id="input-shareholder5_chn_name" class="form-control" />
                      
                    </div>
                  </div>
                  <div class="form-group shareholder" >
                    <label class="col-sm-3 control-label" for="input-shareholder_share_5"><?php echo $entry_shareholder_share_5; ?></label>
                    <div class="col-sm-9">
                      <input type="text" name="shareholder_share_5" value="<?php echo $shareholder_share_5; ?>" placeholder="<?php echo $entry_shareholder_share_5; ?>" id="input-shareholder_share_5" class="form-control" />
                      <?php if (isset($error_shareholder_share_5)) { ?>
                      <div class="text-danger"><?php echo $error_shareholder_share_5; ?></div>
                      <?php } ?> 
                    </div>
                  </div> 
                  <div class="form-group">
                    <label class="col-sm-3 control-label" for="input-shareholder5_name" ><?php echo $entry_shareholder5_id; ?></label>
                    <div class="col-sm-9">
                      <div class="layui-upload" style="margin-bottom: 10px;">
                        <button type="button" class="layui-btn layui-btn-normal testList" data-name="shareholder5"><?php echo $button_upload; ?></button>
                      </div> 
                    </div>
                    <label class="col-sm-3 control-label"></label>
                    <div class="col-sm-9 shareholder5">
                      <?php if(isset($shareholder5_childs)){ ?>
                        <?php foreach($shareholder5_childs as $key => $value){ ?>
                            <div class="<?php echo 'shareholder5_child_'.$value['project_file_id']; ?>">
                              <div class="input-group">
                                <input type="text" name="<?php echo 'shareholder5_name['.$value['project_file_id'].']'; ?>" value="<?php echo $value['file_name'] ?>" id="input-shareholder5_name" class="form-control" />
                                <input type="hidden" name="<?php echo 'shareholder5_child['.$value['project_file_id'].']'; ?>" value="<?php echo $value['project_file_id'] ?>" class="form-control" />
                                <span class="input-group-btn">
                                  <a target="_blank" href="<?php echo HTTP_CATALOG.substr($value['file_url'],54);?>" class="btn btn-primary"><i class="fa fa-eye"></i>查看</a>
                                  <button type="button" data-type="shareholder5_child_<?php echo $value['project_file_id'] ?>" data-name="<?php echo $value['project_file_id'] ?>"  data-id="shareholder5" data-loading-text="<?php echo $text_loading; ?>" class="button-clear btn btn-danger"><i class="fa fa-eraser"></i> <?php echo $button_clear; ?>
                                  </button>
                                </span>
                              </div>
                            </div>
                        <?php } ?>
                      <?php } ?>
                    </div>
                  </div>


                </div>
                <?php } ?>
              </div>
            </div>
          </div>
        </form>
      </div>
    </div>
  </div>
  <script type="text/javascript"><!--
<?php foreach ($languages as $language) { ?>
$('#input-description<?php echo $language['language_id']; ?>').summernote({
	height: 300
});
<?php } ?>
//--></script> 
<script type="text/javascript">
  $('.testList').on('click',function(){
    var name = $(this).attr('data-name');
    console.log(name);
    layer.open({
      type: 2,
      title: 'UPLOAD',
      shadeClose: true,
      shade: 0.8,
      area: ['50%', '50%'],
      btn:['確定','返回'],
      content: 'index.php?route=project/project_customer/file_upload&token=<?php echo $token; ?>', //iframe的url
      yes: function(index, layero){
      //do something
      var body = layer.getChildFrame('body', index); //如果设定了yes回调，需进行手工关闭
      var a = body.find('input[type=\'hidden\']');
      var numArr = new Array();
        a.each(function(){
            numArr.push($(this).val());//添加至数组
        });
        console.log(numArr);
        $.ajax({
            url: 'index.php?route=project/project_customer/getFiles&token=<?php echo $token; ?>',
            type: 'post',
            dataType: 'json',
            data: {da:numArr},
            success: function(json) {
              if(json['status'] == 1){
                var a = json['project_file'];
                $.each(a,function(index, el) {
                    console.log(index,el);
                    html = '';
                    html += '<div class="'+name+'_child_'+el.project_file_id+'"><div class="input-group"><input type="text" name="'+name+'_name['+el.project_file_id+']" value="'+el.file_name+'" id="input-'+name+'_name" class="form-control" /><input type="hidden" name="'+name+'_child['+el.project_file_id+']" value="'+el.project_file_id+'" class="form-control" /><span class="input-group-btn"><a target="_blank" href="<?php echo HTTP_CATALOG;?>'+el.file_url.substring(54)+'" class="button-upload btn btn-primary"><i class="fa fa-eye"></i>查看</a><button type="button" data-type="'+name+'_child_'+el.project_file_id+'" data-name="'+el.project_file_id+'"  data-id="'+name+'" data-loading-text="<?php echo $text_loading; ?>" class="button-clear btn btn-danger"><i class="fa fa-eraser"></i> <?php echo $button_clear; ?></button></span></div></div>';
                    $('label[for=\'input-'+name+'_name\']').parent().children('div.'+name+'').append(html);   
                });
              }
              
              parent.layer.close(index);
            },
            error: function(xhr, ajaxOptions, thrownError) {
              alert(thrownError + "\r\n" + xhr.statusText + "\r\n" + xhr.responseText);
            }
        });
        
    }
    });

});
$('body').on('click','.button-clear', function() {
  // console.log(111);
  var data_type = $(this).attr('data-type');
  var da = {
      name:$(this).attr('data-name'),
      id:$(this).attr('data-id'),
      project_customer_id:$("input[name=\'project_customer_id\']").val(),
  };
  var id = $(this).attr('data-id');
  var r=confirm("Are you sure?");
  if( r == true ){
  $.ajax({
    url: 'index.php?route=project/project_customer/clear&token=<?php echo $token; ?>',
    data:da,
    dataType: 'json',
    beforeSend: function() {
      $('#button-clear').button('loading');
    },
    complete: function() {
      $('#button-clear').button('reset');
    },
    success: function(json) {
      $('.alert').remove();

      if (json['error']) {
        $('#content > .container-fluid').prepend('<div class="alert alert-danger"><i class="fa fa-exclamation-circle"></i> ' + json['error'] + ' <button type="button" class="close" data-dismiss="alert">&times;</button></div>');
      }

      if (json['success']) {
        $('input[name=\''+id+'_name\']').attr('value', '');
        $('input[name=\''+id+'_url\']').attr('value','');
          $('button[data-clear=\''+id+'_clear\']').attr('data-name', '');
          $('.'+data_type+'').remove();
          alert('Clear Success'); return false;
      }
    },
    error: function(xhr, ajaxOptions, thrownError) {
      alert(thrownError + "\r\n" + xhr.statusText + "\r\n" + xhr.responseText);
    }
  });
}
});
</script>




  <script type="text/javascript"><!--
$('#language a:first').tab('show');
//--></script></div>
<?php echo $footer; ?>